Skip to content

Remove require_button, add debug_logging, default no-match to pass-through, and update tests/UI#775

Merged
multiplex55 merged 1 commit intomasterfrom
codex/decide-on-require_button-implementation-or-removal
Jan 31, 2026
Merged

Remove require_button, add debug_logging, default no-match to pass-through, and update tests/UI#775
multiplex55 merged 1 commit intomasterfrom
codex/decide-on-require_button-implementation-or-removal

Conversation

@multiplex55
Copy link
Copy Markdown
Owner

Motivation

  • Simplify mouse gesture settings by removing the legacy require_button field and provide an opt-in debug logging switch for diagnostics.
  • Make the no-match behavior clearer and safer by defaulting to pass-through right-click so gestures that don't match won't silently swallow clicks.

Description

  • Replace require_button with debug_logging in MouseGestureSettings and default it to false (src/plugins/mouse_gestures.rs).
  • Wire debug_logging into runtime config (MouseGestureRuntime::apply) and add debug_logging to MouseGestureConfig so runtime receives the flag (src/plugins/mouse_gestures.rs, src/mouse_gestures/service.rs).
  • Replace the println!-style debug dump by emitting tracing::debug! for produced gesture tokens when config.debug_logging is enabled (src/mouse_gestures/service.rs).
  • Change the default no-match behavior to PassThroughClick and add a short explanatory note to the settings UIs (src/plugins/mouse_gestures.rs, src/gui/mouse_gesture_settings_dialog.rs).
  • Update the plugin settings UI and the standalone settings dialog to expose debug_logging and document the no-match fallback (src/plugins/mouse_gestures.rs, src/gui/mouse_gesture_settings_dialog.rs).
  • Update unit tests in tests/mouse_gestures_plugin.rs to validate settings (serialize/deserialize) with the new debug_logging field and to confirm legacy fields like require_button are ignored.

Testing

  • Added/modified unit test mouse_gestures_settings_ignore_legacy_fields in tests/mouse_gestures_plugin.rs to assert legacy JSON still deserializes and that debug_logging is handled correctly.
  • No automated test suite was executed as part of this change; run cargo test locally or in CI to validate the test suite and runtime behavior.

Codex Task

@multiplex55 multiplex55 merged commit 9ebd0c4 into master Jan 31, 2026
1 check passed
@multiplex55 multiplex55 deleted the codex/decide-on-require_button-implementation-or-removal branch February 1, 2026 00:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant